import { request } from '@pkg/request/src';

export enum Api {
  getUserPrivatedata = '/userPrivatedata/get',
  privateDataUpdate = '/userGoods/privateDataUpdate',
}

export const getUserPrivatedata = privateDataId =>
  request.get(
    {
      url: Api.getUserPrivatedata,
      params: { privateDataId: privateDataId },
    },
    { errorMessageMode: 'message', successMessageMode: 'none' },
  );

export const privateDataUpdate = params =>
  request.post(
    {
      url: Api.privateDataUpdate,
      params: params,
    },
    { errorMessageMode: 'message' },
  );
